!include <win32.mak>

PRJNAME=tracelog

LIB_FILES= KERNEL32.lib MSVCRT.lib user32.lib ADVAPI32.LIB gdi32.lib comctl32.lib shell32.lib comdlg32.lib


CPP_FILES= dllmain.cpp db_log.cpp ini.cpp listview.cpp log.cpp tracelog.cpp trayicon.cpp w_main.cpp w_filter.cpp w_detail.cpp 

OBJS= $(CPP_FILES:.cpp=.obj)

all: tracelog.res db_syb_cpp db_mss_cpp x_exe

db_syb_cpp:
	$(cc) -Ox $(cflags) $(cvarsdll) -I$(SYBASE)\include -DSTRICT -DUNICODE -D_UNICODE -YX -DNODEBUG -DDBNTWIN32 db_syb.cpp

db_mss_cpp:
	$(cc) -Ox $(cflags) $(cvarsdll) -IC:\Home\VC\MSSQL\devtools\include -DSTRICT -DUNICODE -D_UNICODE -YX -DNODEBUG -DDBNTWIN32 db_mss.cpp


.cpp.obj:
	$(cc) -Ox $(cflags) $(cvarsdll) -DSTRICT -DUNICODE -D_UNICODE -YX -DNODEBUG -DDBNTWIN32 $<

tracelog.res: tracelog.rc resource.h
	rc $(rcvars) $(rcflags) -r -fo tracelog.res tracelog.rc

x_exe: $(OBJS)
    $(link) /dll /RELEASE -out:$(PRJNAME).dll $(OBJS) db_mss.obj db_syb.obj tracelog.res $(LIB_FILES) /DEF:$(PRJNAME).def

clean:
    -del *.obj
	-del *.dll
	-del *.pch
	-del *.exp
	-del *.lib
	-del *.res
